Data Cleaning and Transformation

Dr. Nathaniel Cline

Agenda

1

What Gets Counted?

2

Reproducible data analysis

3

and RStudio

4

Review and to do

Homework review

  • Questions or problems with the Bechdel assignment?

Today’s project

  • We will use a a data set to examine several questions surrounding college earnings and major choice.

  • The data originally comes from FiveThirtyEight, but I’ve taken the liberty of making it kind of messy for you.

  • We will import, clean, and explore

Import

YAML

Update the YAML, changing the author name to your name, and render the document.

CSV

Missing values, NAs

Janitor

Variable types

skipping rows

writing to a file

Tidying

Tidy data

Pivoting

parse_number

Transforming

Glimpse

dplyr basics

Rows (filter, arrange, distinct)

Mutate

Select

Rename

Relocate

Pipe

group_by

slice

ungrouping

Aggregation

Review and to-do

Econ 255 - Data Storytelling

1 / 32
Data Cleaning and Transformation Dr. Nathaniel Cline

  1. Slides

  2. Tools

  3. Close
  • Data Cleaning and Transformation
  • Agenda
  • Homework review
  • Slide 4
  • Today’s project
  • Import
  • YAML
  • Slide 8
  • CSV
  • Missing values, NAs
  • Janitor
  • Variable types
  • skipping rows
  • writing to a file
  • Tidying
  • Tidy data
  • Pivoting
  • parse_number
  • Transforming
  • Glimpse
  • dplyr basics
  • Rows (filter, arrange, distinct)
  • Mutate
  • Select
  • Rename
  • Relocate
  • Pipe
  • group_by
  • slice
  • ungrouping
  • Aggregation
  • Review and to-do
  • f Fullscreen
  • s Speaker View
  • o Slide Overview
  • e PDF Export Mode
  • b Toggle Chalkboard
  • c Toggle Notes Canvas
  • d Download Drawings
  • ? Keyboard Help